package se.kth.fericss.quicksort;
public class InsertionSort
{
     /**
     * Sort the elements in ascending order.
     * @param A    An array of integers.
     * @return     A new array with the same integers sorted in ascending order.
     */
    public void sort(int[] A, int low, int high) {
        for(int i=low; i<=high; i++){
            for (int k = i; k > 0 && A[k] < A[k-1]; k--){
            	int temp=A[k];
            	A[k]=A[k-1];
            	A[k-1]=temp;
            }   
        }
    }
    
 }
